package com.geek.gkpush.framework.retry;

import com.geek.gkpush.framework.retry.model.RetryDelayModel;
import com.geek.gkpush.framework.retry.model.RetryResult;

/**
 * <h1>重试任务处理接口。</h1><br/>
 *
 * <h1><br/><a href="https://u.geekbang.org/subject/arch3/100614201">Java 业务架构实战营：https://u.geekbang.org/subject/arch3/100614201</a></h1><br/><h1><a href="https://gitee.com/ylimhhmily/BizArchPracticeCamp">Java 业务架构实战营代码地址：https://gitee.com/ylimhhmily/BizArchPracticeCamp</a></h1><br/><h1><a href="https://u.geekbang.org/subject/java4th/1001148?source=app_share">高级 Java 工程体系课 2023 版：https://u.geekbang.org/subject/java4th/1001148?source=app_share</a></h1><br/><h1><a href="https://time.geekbang.org/column/intro/100312101?tab=catalog">Dubbo 源码剖析与实战：https://time.geekbang.org/column/intro/100312101?tab=catalog</a></h1>
 *
 * @author hmilyylimh
 * ^_^
 * @version 0.0.1
 * ^_^
 * @date 2023/10/3 09:12
 */
public interface RetryMsgHandler {

    /**
     * <h2>异步处理重试消息，如果失败的话则会根据当前已执行次数情况重新丢回队列。</h2>
     *
     * @param: task
     * @return: com.geek.gkpush.framework.retry.model.RetryResult
     */
    RetryResult asyncProcessRetryMsg(RetryDelayModel task);
}